﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

namespace BaoJian.P.Control
{
    /// <summary>
    /// 二级栏目的推荐产品
    /// </summary>
    public partial class RecommandProduct : System.Web.UI.UserControl
    {
        public int Count  = 10;
        public string ColumnID;      
        public string RequestColumnID;
       // private LYQ.BLL.RecommendProduct bll = new LYQ.BLL.RecommendProduct();
        protected void Page_Load(object sender, EventArgs e)
        {
            if(HttpContext.Current.Request["c"] != null)
            {
                RequestColumnID = HttpContext.Current.Request["c"];
            }
          
            if (!Page.IsCallback)
            {
                if ((RequestColumnID != null) &&(ColumnID.ToLower() == RequestColumnID.ToLower()))
                {
                    if (ColumnID.ToLower() == "d622155b-fb54-48dd-bf65-a549a836dc95")
                    {
                        ColumnID ="53142273-e487-4234-b8b6-a78cd00b9443";
                    }
                    else if (ColumnID.ToLower() == "53142273-e487-4234-b8b6-a78cd00b9443")
                    {
                        ColumnID = "a80b3657-1de5-4219-8fe5-e833c9e023a4";
                    }
                    else if (ColumnID.ToLower() == "a80b3657-1de5-4219-8fe5-e833c9e023a4")
                    {
                        ColumnID = "d622155b-fb54-48dd-bf65-a549a836dc95";
                    }
                }

                //bll = new LYQ.BLL.RecommendProduct();
                //Repeater1.DataSource = bll.GetListEx(Count, ColumnID).Tables[0];

                //Repeater1.DataBind();
            }
        }
    }
}